<?php
class Feedback extends CI_Controller{
	function index(){
		$post_data = $_POST;
		if($post_data){
			$feedback = array(
				'os' => $post_data['p'],
				'os_version' => $post_data['os'],
				'imei' => $post_data['imei'],
				'vendor' => $post_data['vendor'],
				'model' => $post_data['md'],
				'plus_version' => $post_data['plus_version'],
				'network' => $post_data['net'],
				'app_version' => $post_data['app_version'],
				'content' => $post_data['content'],
				'contact' => $post_data['contact'],
				'score' => $post_data['score'],
				'imgs' => '',
				'status' => 0,
				'add_time' => time()
				);
			//TODO:上传图片
			$this->db->insert('tiku_feedback',$feedback);
			echo json_encode(array("code" => 1, "data" => 'success'));;

		}else{
			echo json_encode(array("code" => 404, "data" => 'not data'));;
		}
		// $data = file_get_contents("php://input");
		// echo $data;
	}
}